package stardust.core.network;


import java.io.OutputStream;


public class NetworkSessionOutputStream extends OutputStream
{

  private NetworkSession session;

  public NetworkSessionOutputStream(NetworkSession session)
  {
    this.session = session;
  }

  public void write(int data)
  {
    this.session.write((byte) data);
  }

  public void write(byte data[])
  {
    this.write(data, 0, data.length);
  }

  public void write(byte data[], int off, int len)
  {
    this.session.write(data, off, len);
  }

  public void write(String s)
  {
    this.write(s.getBytes());
  }

  public void writeLine(String s)
  {
    this.write(s + "\r\n");
  }

}
